import './style.scss'; import { ReactNode } from 'react'; import { notFound } from 'next/navigation'; import { fetchUserProfile } from '@/lib/api/account/profile'; import UserProfileHeader from './_component/UserProfileHeader'; type Props = { children: ReactNode; params: Promise<{ sid: string }>; }; export default async function UserProfileLayout({ children, params }: Props) { const { sid } = await params; const res = await fetchUserProfile(sid); if (!res.success || !res.data) { notFound(); } const profile = res.data; return (
{children}
); }